Skip to content

Conversation

@calvinbrewer
Copy link
Contributor

@calvinbrewer calvinbrewer commented Oct 3, 2025

  • Update @cipherstash/protect-ffi from 0.16.0 to 0.17.1 with support for x86_64 musl platforms.
  • Add searchableJson() method to schema for JSON field indexing (the search operations still don't work but this interface exists)
  • Refactor type system: EncryptedPayload → Encrypted, add JsPlaintext
  • Add comprehensive test suites for JSON, integer, and basic encryption
  • Update encryption format to use 'k' property for searchable JSON
  • Remove deprecated search terms tests for JSON fields
  • Simplify schema data types to text, int, jsonb only
  • Update model helpers to handle new encryption format
  • Fix type safety issues in bulk operations and model encryption

- Add searchableJson() method to schema for JSON field indexing
- Update @cipherstash/protect-ffi from 0.16.0 to 0.17.0
- Refactor type system: EncryptedPayload → Encrypted, add JsPlaintext
- Add comprehensive test suites for JSON, integer, and basic encryption
- Update encryption format to use 'k' property for searchable JSON
- Remove deprecated search terms tests for JSON fields
- Simplify schema data types to text, int, jsonb only
- Update model helpers to handle new encryption format
- Fix type safety issues in bulk operations and model encryption
… EncryptedPayload

- Replace EncryptedPayload imports with Encrypted type across all DynamoDB operations
- Update EQL payload structure in toItemWithEqlPayloads helper function
- Simplify payload structure by removing unused fields (bf, hm, ob)
- Update type annotations in decrypt operations and bulk operations
- Add TODO comment for future ste_vec EQL type support
- Remove empty test suite that was causing 'No test found' error
- Remove unused test variable
- Add comment placeholder for future tests
- Keep boilerplate setup for when tests are needed
- Add searchable JSON column support with ste_vec indexes
- Update toItemWithEqlPayloads to construct proper EQL payloads for JSON types
- Handle both standard ciphertext (ct) and searchable vector (sv) payloads
- Pass ProtectTable schema to helpers for column metadata access
- Add comprehensive test coverage for JSON and nested JSON encryption
- Support nested protectNestedJson values in test data
- Add comment noting need to implement new Encrypt payload type
- Reminder to update when FFI interface is updated for sv payloads
Copy link
Contributor

@coderdan coderdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work! Great tests. I'd like to get clarity on some of the comments before approving.

@calvinbrewer calvinbrewer changed the title feat: ✨ add searchable JSON encryption and update FFI to v0.17.0 feat: ✨ add searchable JSON encryption and update FFI to v0.18.0 Oct 21, 2025
@calvinbrewer calvinbrewer changed the title feat: ✨ add searchable JSON encryption and update FFI to v0.18.0 feat: ✨ add JSON and INT data types and update FFI to v0.18.0 Oct 22, 2025
@calvinbrewer calvinbrewer changed the title feat: ✨ add JSON and INT data types and update FFI to v0.18.0 feat: ✨ add JSON and INT data types and update FFI to v0.17.0 Oct 23, 2025
Copy link
Contributor

@coderdan coderdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor things but the blocker is to remove the searchable JSON stuff (or at least the doc) until the related changes land in FFI so we can release without it.

@coderdan coderdan self-requested a review October 28, 2025 05:17
coderdan and others added 3 commits October 28, 2025 16:23
…generic

- Rename 'text' to 'string' for text data types
- Rename 'int' to 'number' for numeric data types
- Rename 'jsonb' to 'json' for JSON data types
- Update all schema definitions and tests to use generic type names
- Add validation in search-terms to check for valid encrypted payloads
- Set default type to 'string' instead of 'text'

This makes the API more framework-agnostic and easier to use across different databases and contexts.
- Update @cipherstash/protect-ffi from 0.17.0 to 0.17.1
- Add init-protect.md prompt guide for implementing Protect.js into Node.js applications
- Update pnpm-lock.yaml with new dependency versions
@calvinbrewer calvinbrewer changed the title feat: ✨ add JSON and INT data types and update FFI to v0.17.0 feat: ✨ add JSON and INT data types and update FFI to v0.17.1 Oct 28, 2025
@coderdan coderdan merged commit 0a3bda3 into main Oct 29, 2025
1 check passed
@coderdan coderdan deleted the json-int branch October 29, 2025 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants